// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 软删除用户 DELETE /api/users/deleteUser/${param0} */
export async function deleteUserUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteUserUsingDELETEParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.Boolean_>(`/api/users/deleteUser/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 导出用户数据 GET /api/users/exportUsers */
export async function exportUsersUsingGet(options?: { [key: string]: any }) {
  return request<API.ListUserVo_>('/api/users/exportUsers', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 获取当前登录用户信息 GET /api/users/getCurrentUser */
export async function getUserInfoUsingGet(options?: { [key: string]: any }) {
  return request<API.User_>('/api/users/getCurrentUser', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 条件分页查询用户 POST /api/users/getUserByConditions */
export async function getUserByConditionsUsingPost(body: API.UserQueryRequest, options?: { [key: string]: any }) {
  return request<API.PageUserVo_>('/api/users/getUserByConditions', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 查询数据库所有用户 GET /api/users/getUserList */
export async function getUserListUsingGet(options?: { [key: string]: any }) {
  return request<API.PageUserVo_>('/api/users/getUserList', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 导入用户数据 POST /api/users/importUsers */
export async function importUsersUsingPost(body: API.User[], options?: { [key: string]: any }) {
  return request<API.Boolean_>('/api/users/importUsers', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 用户登出 POST /api/users/layout */
export async function layoutUsingPost(options?: { [key: string]: any }) {
  return request<API.String_>('/api/users/layout', {
    method: 'POST',
    ...(options || {}),
  })
}

/** 用户登录 POST /api/users/login */
export async function userLoginUsingPost(body: API.UserLoginRequest, options?: { [key: string]: any }) {
  return request<API.User_>('/api/users/login', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 用户注册 POST /api/users/register */
export async function userRegisterUsingPost(body: API.UserRegisterRequest, options?: { [key: string]: any }) {
  return request<API.Long_>('/api/users/register', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 重置用户密码 PUT /api/users/resetPassword */
export async function resetUserPasswordUsingPut(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.resetUserPasswordUsingPUTParams,
  options?: { [key: string]: any }
) {
  return request<API.Boolean_>('/api/users/resetPassword', {
    method: 'PUT',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 更新用户密码 PUT /api/users/updatePassword */
export async function updateUserPasswordUsingPut(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateUserPasswordUsingPUTParams,
  options?: { [key: string]: any }
) {
  return request<API.Boolean_>('/api/users/updatePassword', {
    method: 'PUT',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 更新用户信息 PUT /api/users/updateUser */
export async function updateUserUsingPut(body: API.UserUpdateRequest, options?: { [key: string]: any }) {
  return request<API.UserVo_>('/api/users/updateUser', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
